    <h1>Product History</h1>
    <div id="form">
        <a href="<?php echo url_for('stock_index') ?>" class="bt_back"><img src="<?php echo image_path('Buttons/bt_arrow_back.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_arrow_back_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_arrow_back.png') ?>'"></a>
        <form action="<?php echo url_for('stock_index') ?>">
            <fieldset>
            <legend>History</legend>
                <div id="scroll_div">
                    <table id="history">
                        <tr style="visibility:hidden;"><!-- for some unknown reason the table head doesn't show if this isn't there -->
                            <td>.</td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr class="bold head_small">
                            <td>Date</td>
                            <td>Sold</td>
                            <td>Produced</td>
                            <td>Order No.</td>
                            <td>Stock Balance</td>
                        </tr>
                        <?php foreach ($productHistory as $i=>$historyLine): ?>
                            <tr class="table_hov <?php echo fmod($i, 2) ? 'even' : 'odd' ?> ">
                                <td><?php echo $historyLine->getCreatedAt() ?></td>
                                <td><?php echo $historyLine->getSold() ?></td>
                                <td><?php echo $historyLine->getProduced() ?></td>
                                <td><?php echo $historyLine->getOrderId() ?></td>
                                <td><?php echo $historyLine->getStock() ?></td>                          
                            </tr>
                        <?php endforeach; ?>
                    </table>
                </div>
            </fieldset>
            <input type="submit" value="" class="ok"/>
        </form>
    </div>